﻿//*************************************************************************
//面向服务的协作式智能交通系统仿真软件SoC-ITSS v2.1 alpha
//发布单位：西北工业大学--巴黎高科MINES机器人与群智能系统联合实验室
//团队负责人：张凯龙 Zhang Kailong
//团队成员：张大方、杨安胜、王敏、谢策、王雨佳、谢尘玉等
//联系我们：kl.zhang@nwpu.edu.cn
//2012-2021
//*************************************************************************

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CyberCarSimulation.CustomForm
{
    public partial class VerticalLine : UserControl
    {

        private Color lineColor = Color.Black;
        private int lineHeight = 1;

        public VerticalLine()
        {
            InitializeComponent();
            this.Width = 30;
            this.Height = 170;

        }

        protected void OnPaint1(PaintEventArgs e)
        {
            base.OnPaint(e);
            Pen pen = new Pen(SystemColors.ControlText);//定义一个画笔    
            e.Graphics.DrawLine(pen, 1, 1, 1, 190);
        }


        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
   
             //在内存中创建虚拟画布 
            string MapPath = Application.StartupPath + "\\BackgroundMap\\VerRoad.jpg";
            Bitmap BackgroundBitmap = new Bitmap(MapPath, true);
            Graphics MapGraphics = Graphics.FromImage(BackgroundBitmap);

            //在界面控件上绘制背景
            e.Graphics.DrawImage(BackgroundBitmap, 0, 20);
        }
        
    }
}
